package Bank;

/**
 * @Author admin
 * @Date 2019/3/19 13:47
 */
public class WZBank extends Bank{
    double year;
    public  WZBank(){

    }

    public WZBank(int money,double rate,double year) {
        super(money,rate);
        this.year = year;
    }

    @Override
    public double computerInterest(){
        super.year=(int)year;
        int day=(int)((year-super.year)*1000);
        double yearInter=super.computerInterest();
        double dayInter=day*money*0.0002;
        System.out.println(money+"元，存在温州银行，"+super.year+"年"+day+"天,利息是：" +
                (yearInter+dayInter));
        return computerInterest()+dayInter;
    }
}
